/*
 * Wire
 * Copyright (C) 2018 Wire Swiss GmbH
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/.
 *
 */

// modal
.detail-view {
  &.modal::before {
    background-color: #fff;
  }

  &.modal-show {
    .flex-center;
  }
}

// wrapper
.detail-view-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  width: 100%;
}

// layout
.detail-view-header {
  .flex-center;
  flex: 0 0 auto;
  height: 72px;
  line-height: @line-height-sm;
}

.detail-view-header-close-button {
  .circle(40px);
  .flex-center;
  right: 24px;
  cursor: pointer;
  position: absolute;
}

.detail-view-main {
  .flex-center;
  flex: 1 1;
}

// fix flexbox issue in FF
@-moz-document url-prefix() {
  .detail-view-main {
    min-height: 0;
  }
}

.detail-view-footer {
  .flex-center;
  flex: 0 0 auto;
  height: 72px;

  .detail-view-action-button + .detail-view-action-button {
    margin-left: 40px;
  }
}

// TODO generic butotn
.detail-view-action-button {
  .label-bold-xs;
  align-items: center;
  cursor: pointer;
  display: flex;

  & > span:first-child {
    margin-right: 12px;
  }
}

.detail-view-image {
  max-width: 84%;
  max-height: 84%;
  object-fit: scale-down;
}
